package com.shop.shoporder.mapper.order;

import com.shop.shoporder.entity.order.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface OrderMapper {
    int deleteByPrimaryKey(Integer orderId);

    int insert(Order record);
    int updatePayType(@Param("payType") Integer payType, @Param("orderNo")String orderNo);
    int insertSelective(Order record);
    List<Order> selectOrderCheck(Date ptime);
    Order selectByPrimaryKey(Integer orderId);
    Order selectOrderByGroup(@Param("groupbuyGoodsid") Integer groupbuyGoodsid,@Param("groupbuyId") Integer groupbuyId,@Param("participateId") Integer participateId);
    Order selectByOrderNo(String orderNo);
    Order selectByOrderNoAsDetails(String orderNo);
    int updateByPrimaryKeySelective(Order record);
    int upAutoReceivingGoods(@Param("payFinishTime") Date payFinishTime,@Param("orderNoList") List<String> orderNoList,@Param("orderStatus") String orderStatus);
    int upAutoCancalOrder(@Param("cancelTime") Date cancelTime,@Param("orderNoList") List<String> orderNoList,@Param("orderStatus") String orderStatus);
    int updateByPrimaryKey(Order record);
    List<Order> selectByOrderStatus(Order record);
    List<Order> selectByOrderStatus1(Order record);
    List<Order> selectCancelOrder28(Order record);
    List<Order> adminSelectOrderList(@Param("orderStatus") Integer orderStatus, @Param("orderNo")String orderNo,@Param("usernoId")Integer usernoId, @Param("logName")String logName, @Param("phone")String phone);
    List<Order> adminSelectOrderShopList(@Param("orderStatus") Integer orderStatus, @Param("orderNo")String orderNo,@Param("usernoId")Integer usernoId, @Param("logName")String logName, @Param("phone")String phone,@Param("zoneId") Integer zoneId);
    List<Order> selectOrderNumber(Integer usernoId);
    List<Order> adminSelectOrderList1(@Param("orderStatus") Integer orderStatus, @Param("orderNo")String orderNo,@Param("usernoId")Integer usernoId, @Param("logName")String logName, @Param("phone")String phone);
    int upOrderFrom(@Param("orderFromTime") Date orderFromTime,@Param("orderNoList") List<String> orderNoList);

    int updateOrderStatus1(@Param("orderStatus") String orderStatus,@Param("deliveryTime") Date deliveryTime,@Param("orderList") List<String> orderList);
}